package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Repository;

import com.easyweb.dao.AlbumDao;
import com.easyweb.dao.BaseDao;
import com.easyweb.model.Album;
@ComponentScan
@Repository
public class AlbumDaoImpl extends BaseDao implements AlbumDao{

	public int insertAlbum(Album album) {
		return getSqlSession().insert("album.insertAlbum",album);
	}

	public int deleteAlbumById(Map<String, Object> map) {
		return getSqlSession().delete("album.deleteAlbumById", map);
	}

	public int updateAlbum(Album album) {
		return getSqlSession().update("album.updateAlbumById", album);
	}

	public List<Album> getAlbums(Map<String, Object> map) {
		return getSqlSession().selectList("album.selectAlbums", map);
	}

	public Album getAlbumById(Map<String, Object> map) {
		return getSqlSession().selectOne("album.selectAlbums", map);
	}

}
